package com.mapfinal.server.mgrdb;

import com.lambkit.Lambkit;

public class MapfinalMgrdbManager {

	private static MapfinalMgrdbManager manage = null;
	
	private static final String cacheName = "mapfinal_mgrdb";

	private MapfinalMgrdbManager() {
	}

	public static MapfinalMgrdbManager me() {
		if (manage == null) {
			manage = new MapfinalMgrdbManager();
		}
		return manage;
	}
	
	public void clearCache() {
		Lambkit.getCache().removeAll(cacheName);
	}
	
	public String getCacheName() {
		return cacheName;
	}
	
	public void putCache(String key, Object value) {
		Lambkit.getCache().put(cacheName, key, value);
	}
	
	public <T> T getCache(String key) {
		return Lambkit.getCache().get(cacheName, key);
	}
	
	public void removeCache(String key) {
		Lambkit.getCache().remove(cacheName, key);
	}
}
